<?php
namespace Mp\Service\Common;
use Illuminate\Support\Fluent;

class  Asset {

	protected static $js = [];

	protected static  $script = [];

	protected static $css = [];

	protected static $baseJs = [
		'static/mp/assets/plugins/charts/echarts/js/echarts-all.js',
		'static/mp/assets/plugins/jquery/dist/jquery.min.js',
		'static/mp/assets/plugins/jquery-ui/jquery-ui.min.js',
		'static/mp/assets/plugins/tether/dist/js/tether.min.js',
		'static/mp/assets/plugins/bootstrap/js/bootstrap.min.js',
		'static/mp/assets/plugins/Waves/waves.min.js',
		'static/mp/assets/plugins/jquery-slimscroll/jquery.slimscroll.js',
		'static/mp/assets/plugins/jquery.nicescroll/jquery.nicescroll.min.js',
		'static/mp/assets/plugins/classie/classie.js',
		'static/mp/assets/plugins/notification/js/bootstrap-growl.min.js',
		'static/mp/assets/plugins/d3/d3.js',
		'static/mp/assets/plugins/rickshaw/rickshaw.js',
		'static/mp/assets/plugins/jquery-sparkline/dist/jquery.sparkline.js',
		'static/mp/assets/plugins/waypoints/jquery.waypoints.min.js',
		'static/mp/assets/plugins/countdown/js/jquery.counterup.js',
		'static/mp/assets/js/main.min.js',
		'static/mp/assets/pages/dashboard.js',
		'static/mp/assets/pages/elements.js',
		'static/mp/assets/js/menu.min.js',
	];

	protected static $baseCss = [
		'https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800',
		'static/mp/assets/icon/icofont/css/icofont.css',
		'static/mp/assets/icon/simple-line-icons/css/simple-line-icons.css',
		'static/mp/assets/plugins/bootstrap/css/bootstrap.min.css',
		'static/mp/assets/css/svg-weather.css',
		'static/mp/assets/css/main.css',
		'static/mp/assets/css/responsive.css',
		'static/mp/assets/css/color/color-1.min.css',
	];

	protected static $jQuery = '';

	

	public static function js(...$js){	
		$js = reset($js);
		if(!empty($js)){
			self::$js = array_merge(self::$js,(array)$js);		
		}	 
		
		return view('Mp::commons.js',['js' => array_unique(self::$js) ])->render();
	}

	public static function script(...$script){
		$script = reset($script);
		if(!empty($script)){
			self::$script = array_merge(self::$script,(array)$script);
		}
		return view('Mp::commons.script',['script'=>array_unique(self::$script)]);
	}

	public static function css(...$css){
		$css = reset($css);
		if(!empty($css)){
			self::$css = array_merge(self::$css,(array)$css);
		}
		
		return view('Mp::commons.css',['css'=>array_unique(self::$css)])->render();
	}

	/*private function _showJs(){
		return view()->share('js',$this->js);
	}

	private function _showScript(){
		return view()->share('script',$this->script);
		
	}*/

	
	public function render(){
		
	}

}